package com.data.modules.online.cgform.converter.p010b;

import java.util.ArrayList;
import java.util.List;
import com.data.common.system.api.ISysBaseAPI;
import com.data.common.util.SpringContextUtils;
import com.data.common.util.ConvertUtils;
import com.data.modules.online.cgform.entity.OnlCgformField;
import com.data.modules.online.cgform.converter.p009a.ForeseeConvert;

public class DictEasyConverter extends ForeseeConvert {
    public DictEasyConverter(OnlCgformField onlCgformField) {
        List queryDictItemsByCode;
        ISysBaseAPI iSysBaseAPI = (ISysBaseAPI) SpringContextUtils.getBean(ISysBaseAPI.class);
        String dictTable = onlCgformField.getDictTable();
        String dictText = onlCgformField.getDictText();
        String dictField = onlCgformField.getDictField();
        ArrayList arrayList = new ArrayList();
        if (ConvertUtils.isNotEmpty(dictTable)) {
            queryDictItemsByCode = iSysBaseAPI.queryTableDictItemsByCode(dictTable, dictText, dictField);
        } else {
            queryDictItemsByCode = ConvertUtils.isNotEmpty(dictField) ? iSysBaseAPI.queryDictItemsByCode(dictField) : arrayList;
        }
        this.f123b = queryDictItemsByCode;
        this.f122a = onlCgformField.getDbFieldName();
    }
}
